package com.gyj.Actor.service.impl;

import com.gyj.Actor.mapper.LoginMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.gyj.Actor.po.Staff;
import com.gyj.Actor.service.LoginService;

@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 5)
@Service
public class LoginServiceImpl implements LoginService {

    @Autowired
    LoginMapper loginmapper;

    public String getpwdbyname(String name) {
        Staff s = loginmapper.getpwdbyname(name);
        if (s != null)
            return s.getPassword();
        else
            return null;
    }

}
